﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ShowListPost.ascx.cs" Inherits="Web_Pages_UserControls_ShowListPost" %>
<asp:GridView ID="gvListPost" runat="server" AutoGenerateColumns="False" 
    BackColor="White" BorderColor="#CC9966" BorderStyle="None" 
    BorderWidth="1px"  DataKeyNames="IdPost"
    CellPadding="4" AllowPaging="True" 
    onpageindexchanging="gvListPost_PageIndexChanging" 
    onrowcommand="gvListPost_RowCommand1">
    <Columns>
        <asp:BoundField DataField="IdPost" HeaderText="So Id" />
        <asp:TemplateField HeaderText="Tài Khoản">
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# Eval("user.Username") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="Contents" HeaderText="Chủ đề" />
        <asp:BoundField DataField="Privacy" HeaderText="Riêng tư" />
        <asp:BoundField DataField="CreateTime" HeaderText="Thời điểm tạo" />
        <asp:TemplateField HeaderText="Tùy chọn">
            <ItemTemplate>
               <asp:LinkButton ID="lbxoa" Text="Xóa" CommandName="Xoa" runat="server" CommandArgument='<%#Eval("IdPost")%>' ></asp:LinkButton>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
    <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
    <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
    <RowStyle BackColor="White" ForeColor="#330099" />
    <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
    <SortedAscendingCellStyle BackColor="#FEFCEB" />
    <SortedAscendingHeaderStyle BackColor="#AF0101" />
    <SortedDescendingCellStyle BackColor="#F6F0C0" />
    <SortedDescendingHeaderStyle BackColor="#7E0000" />
</asp:GridView>

